-- GENERATED SPELL FOR [Haldarr Felsworn] --


function spell0_6127(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6127', 3000, 1)
end

function spell1_6127(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_6127', 651, 1)
end

function Sorts_6127(pUnit, Event)
local choix_sorts_6127 = math.random(0, 1)
if choix_sorts_6127 == 0 then
pUnit:RegisterEvent('spell0_6127', 1, 1)
end
if choix_sorts_6127 == 1 then
pUnit:RegisterEvent('spell1_6127', 1, 1)
end
end

function mob6127_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6127', math.random(1500, 3000), 1)
end

function mob6127_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6127_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6127_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6127, 1, 'mob6127_Action')
RegisterUnitEvent(6127, 2, 'mob6127_Leave')
RegisterUnitEvent(6127, 3, 'mob6127_Kill')
RegisterUnitEvent(6127, 4, 'mob6127_Die')
